package com.zk.algorithm.linkedlist;

import com.zk.algorithm.annotation.Easy;
import com.zk.algorithm.annotation.LeetCodeExplore;
import com.zk.algorithm.bean.ListNode;

/**
 * @author zk
 */
@LeetCodeExplore
@Easy
public class DeleteANodeInALinkedList {

    // 5 -> 4 -> 3 -> 2
    public void deleteNode(ListNode node) {
        node.val = node.next.val;
        node.next = node.next.next;
    }

}
